
//
//  ThirdViewController.m
//  UI_21_通知
//
//  Created by dllo on 15/11/6.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ThirdViewController.h"

@interface ThirdViewController ()

@end

@implementation ThirdViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
     self.view.backgroundColor = [UIColor redColor];
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor redColor];
    UIButton *bti = [UIButton buttonWithType:UIButtonTypeCustom];
    bti.backgroundColor = [UIColor yellowColor];
    bti.frame = CGRectMake(100, 100, 100, 100);
    [self.view addSubview:bti];
    [bti addTarget:self action:@selector(BUTTONACTION:) forControlEvents:UIControlEventTouchUpInside];
    
    
    
   }
- (void)BUTTONACTION:(UIButton *)btu{
     //发送一个消息通知...post发送
    //参数2，发送消息是传递的值
    [[NSNotificationCenter defaultCenter]postNotificationName:@"changeColor" object:[UIColor brownColor]];

    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
